# -*- coding: utf-8 -*-
"""
@Time    : 2021/10/9 18:04
@Author  : Leibuyun
@File    : 2.13 字符串对齐.py
"""

if __name__ == '__main__':
    text = 'Hello World'
    text.ljust(20, '-')  # 左对齐, 参数为字符串显示的总长度, 填充字符
    text.rjust(20)  # 右对齐
    text.center(20)  # 居中对齐
